FROM centos:centos7
MAINTAINER Xenophon Lau

# centos7仓库已经被关闭，需要换源
RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup \
    && curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo \
    && yum -y update \
    && yum clean all \
    && yum makecache \
    && rm -rf /var/cache/yum \
    && yum -y install unzip \
        binutils \
        compat-libstdc++-33 \
        compat-libstdc++-33.i686 \
        ksh \
        elfutils-libelf \
        elfutils-libelf-devel \
        glibc \
        glibc-common \
        glibc-devel \
        gcc \
        gcc-c++ \
        libaio \
        libaio.i686 \
        libaio-devel \
        libaio-devel.i686 \
        libgcc \
        libstdc++ \
        libstdc++.i686 \
        libstdc++-devel \
        libstdc++-devel.i686 \
        make \
        sysstat \
        unixODBC \
        unixODBC-devel\
    && yum clean all\
    && rm -rf /var/lib/{cache,log} /var/log/lastlog

# 复制 Oracle 安装包到容器（需提前准备安装文件）
WORKDIR /install
COPY linux.x64_11gR2_database_1of2.zip .
COPY linux.x64_11gR2_database_2of2.zip .

# 解压安装包
RUN unzip linux.x64_11gR2_database_1of2.zip \
    && unzip linux.x64_11gR2_database_2of2.zip \
    && rm -f linux.x64_11gR2_database_*.zip

ADD assets /assets
RUN chmod -R 755 /assets

EXPOSE 1521
EXPOSE 8080

CMD ["/assets/start.sh"]







